<?php
session_start();
//header("Content-type:text/html");
if($_SESSION['k_username']){
include("FuncionBd/dbconnect.inc.php");



$passOld= $_POST["passOld"];
$passNew= $_POST["passNew"];
$data=getPass($_SESSION['k_username']);
$passNow=$data->pass;

if($passNow == $passOld){

$data=setPass($_SESSION['k_username'],$passNew);
 echo "1";
}
else echo "2";
}
    
?>